package com.example.kuaizu.mapper;

import com.example.kuaizu.pojo.UpdateUserInfoParam;
import com.example.kuaizu.pojo.dto.SchoolMajorCountDto;
import com.example.kuaizu.pojo.dto.UpdateAuditStatusDto;
import com.example.kuaizu.pojo.ov.UserProfileAndSchoolOV;
import com.example.kuaizu.pojo.pram.TalentAuditParam;
import kuaizu.common.param.QueryTalentParam;
import kuaizu.common.param.StudentInfoListParam;
import kuaizu.common.tablepojo.Project;
import kuaizu.common.vo.TalentListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface HoutaiMapper {
    List<UserProfileAndSchoolOV> selectSchoolStudent(StudentInfoListParam p);


    @Update("UPDATE user_profile set major = #{majorId} ,school=#{schoolId} where openId = #{openId}")
    void updateUserInfo(UpdateUserInfoParam updateUserInfoParam);

    List<SchoolMajorCountDto> getSchoolStudentInfo();
    //修改项目的审核状态
    @Update("UPDATE project set audit_status = #{auditStatus} ,skill_summary=#{remark} where id = #{projectId}")
    void updateAuditStatus(UpdateAuditStatusDto param);
    //查询未审核的项目
    @Select("SELECT * FROM project where audit_status = 0")
    List<Project> getNoAuditProject();

    int talentAudit(TalentAuditParam param);


    List<TalentListVo> queryTalentInfo(QueryTalentParam param);
}
